package com.atguigu.g_map;

import java.util.function.Function;
import java.util.stream.Stream;

public class Demo {
    public static void main(String[] args) {
        //进工厂
        Stream<String> stream = Stream.of("100", "200", "300");

        //进转换车间
        Stream<Integer> integerStream = stream.map(new Function<String, Integer>() {
            @Override
            public Integer apply(String s) {
                return Integer.parseInt(s) + 500;
            }
        });

        integerStream.forEach(System.out::println);
    }
}
